package bzqn.com.rongcloudsdk;

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v7.widget.Toolbar;

import java.util.HashMap;
import java.util.Map;

import io.rong.imkit.RongIM;
import io.rong.imlib.model.Conversation;

public class ChatMainActivity extends FragmentActivity {

    private Toolbar mToolbar;

    public static void startChatList(Context context){
        Map<String, Boolean> supportedConversation = new HashMap<>();
        supportedConversation.put(Conversation.ConversationType.PRIVATE.getName(), false);
        supportedConversation.put(Conversation.ConversationType.SYSTEM.getName(), false);
        RongIM.getInstance().startConversationList(context,supportedConversation);
    }


  //    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        RongIM.getInstance().disconnect();
//    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.chat_activity_main);
        mToolbar = (Toolbar) findViewById(R.id.toolbar);
        mToolbar.setTitle("消息");
    }

}
